class Neighborhood {
public:
    Neighborhood() : _width(0), _height(0) {}

    Neighborhood(int w, int h) {
        _width = w;
        _height = h;
    }

    inline bool operator==(const Neighborhood &other) const {
        return _data == other._data;
    }

    inline bool operator<(const Neighborhood &other) const {
        return _data < other._data;
    }

    inline int width() const { return _width; }
    inline int height() const { return _height; }
    const vector<int> data() const { return _data; }

    void saveFigure(const SpriteCollection &spriteCollection, const string &filename) const;
    Bitmap getBitmap(const SpriteCollection &spriteCollection) const;

    friend InputDataStream & operator>> (InputDataStream &is, Neighborhood &neigh);

private:
    int _width;
    int _height;
    vector<int> _data;

friend class FrameGrid;
};

// We need to be able to serialize these
ostream & operator<< (ostream &os, const Neighborhood &neigh);
OutputDataStream & operator<< (OutputDataStream &os, const Neighborhood &neigh);
InputDataStream & operator>> (InputDataStream &is, Neighborhood &neigh);